class Solution3 {
    public ListNode reverseList(ListNode head) {
        //出口(要加head==null全空的情况)
        if(head==null||head.next==null) {
            return head;
        }

        ListNode newHead =  reverseList(head.next);
        head.next.next = head;//逆置
        head.next = null;//置空
        return newHead;

    }

}